This supplies the main userspace tooling for using and configuring WireGuardtunnels, including thewg(8) andwg-quick(8)utilities. This project supports Linux, OpenBSD, FreeBSD, macOS, Windows, andAndroid.
More information may be found at WireGuard.com.
Building$ cd src$ makeThere are no dependencies other than a good C compiler and a sane libc.
Installing# make installThis command takes into account several environment variables:
PREFIXdefault: /usr
DESTDIR default:
BINDIRdefault: $(PREFIX)/bin
LIBDIRdefault: $(PREFIX)/lib
MANDIRdefault: $(PREFIX)/share/man
BASHCOMPDIR default: $(PREFIX)/share/bash-completion/completions
RUNSTATEDIR default: /var/run
PKG_CONFIGdefault: pkg-config
WITH_BASHCOMPLETION default: [auto-detect]
WITH_WGQUICK default: [auto-detect]
WITH_SYSTEMDUNITSdefault: [auto-detect]
DEBUGdefault:
The first section is rather standard. The second section is not:
WITH_BASHCOMPLETION decides whether or not bash completion files for thetools are installed. This is just a nice thing for people who have bash.If you don't have bash, or don't want this, set the environment variableto no. If you'd like to force its use, even if bash-completion isn'tdetected in DESTDIR, then set it to yes.
WITH_WGQUICK decides whether or not the wg-quick(8) script is installed.This is a very quick and dirty bash script for reading a few extravariables from wg(8)-style configuration files, and automaticallyconfigures the interface. If you don't have bash, you probably don't wantthis at all. Likewise, if you already have a working network managementtool or configuration, you probably want to integrate wg(8) or the directWireGuard API into your network manager, rather than using wg-quick(8).But for folks who like simple quick and dirty scripts, this is nice. If you'dlike to force its use, even if bash isn't detected in DESTDIR, then set itto yes.
WITH_SYSTEMDUNITS decides whether or not systemd units are installed forwg-quick(8). If you don't use systemd, you certainly don't want this, andshould set it to no. If systemd isn't auto-detected, but you still wouldlike to install it, set this to yes.
DEBUG decides whether to build with -g, when set to yes.
If you're a simple make && make install kind of user, you can get away withnot setting these variables and relying on the auto-detection. However, ifyou're writing a package for a distro, you'll want to explicitly set these,depending on what you want.
contrib/The contrib/ subdirectory contains various scripts and examples. Most of theseare not immediately useful for production use, but should provide inspiration forcreating fully-featured tools. See the README in each directory.
LicenseThis project is released under the GPLv2.